<template>
	<view> 
		<form @submit="formSubmit">
			<input name="nickname" placeholder="请输入姓名" />
			<input name="age" placeholder="年龄" />
			<button form-type="submit">提交</button>
		</form>
		<view>{{formdata}}</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				formdata:{}
			}
		},
		methods: {
			formSubmit(e){
				this.formdata = e.detail.value
				console.log(JSON.stringify(this.formdata))
			}
		}
	}
</script>

<style>

</style>